<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .active{
      color:red;
    }
  </style>
</head>
<body>
<div id="app">
  <ul>
    <li :class="{active:currentIndex===index}"
        @click="liClick(index)"
        v-for="(item,index) in movie">{{item}}</li>
  </ul>
</div>
  <script src="../../project_practice/lunbotu/vue.js"></script>
  <script>
    const app = new Vue({
      el:'#app',
      data:{
        message:"你好啊！！",
        movie:['海贼王','斗罗大陆','斗破苍穹','王侯'],
        currentIndex:0
      },
      methods:{
        liClick(index){
          this.currentIndex=index
        }
      }
    })
  </script>
</body>
</html>